function validate_required(field)
{
with (field)
  {
  if (value==null||value=="")
    {return false;}
  else {return true;}
  }
}

function validate_form(thisform)
{
with (thisform)
  {
  if (validate_required(username)==false)
    {username.focus();return false;}
  if (validate_required(password)==false)
  {password.focus();return false;}
  if (validate_required(captcha)==false)
  {captcha.focus();return false;}
  }
}